﻿CREATE TABLE [inventory].[InventoryTransactionItem] (
    [InventoryTransactionItemID] INT          IDENTITY (1, 1) NOT NULL,
    [TransactionTypeID]          INT          NULL,
    [InventoryItemID]            INT          NULL,
    [CreatedBy]                  VARCHAR (50) NULL,
    [CreatedDate]                DATETIME     NULL,
    [UpdatedBy]                  VARCHAR (50) NULL,
    [UpdatedDate]                DATETIME     NULL,
    [EndDate]                    DATETIME     NULL,
    CONSTRAINT [PK_InventoryTransactionItem] PRIMARY KEY CLUSTERED ([InventoryTransactionItemID] ASC),
    CONSTRAINT [FK_InventoryTransactionItem_InventoryItem] FOREIGN KEY ([InventoryItemID]) REFERENCES [inventory].[InventoryItem] ([InventoryItemID]),
    CONSTRAINT [FK_InventoryTransactionItem_TransactionType] FOREIGN KEY ([TransactionTypeID]) REFERENCES [transaction].[TransactionType] ([TransactionTypeID])
);

